<%@ page language="java" import="java.util.*,com.junjie.entity.*" pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <base href="<%=basePath%>"/>
  <title>当当网站导航部分</title>
<link href="css/global.css" rel="stylesheet" type="text/css" />
<link href="css/template.css" rel="stylesheet" type="text/css" />
<script src="js/menu_tree.js" type="text/javascript"></script>
<script src="js/jquery-1.4.3.js" type="text/javascript"></script>
<script type="text/javascript">

//在图书中搜索
function searchBook(){
	$.ajax({
		url:'mainAction!searchBook',
		data:{'likeName':$('#header_serach').val()},
		type:'post',
		dataType:'json',
		success:function(data){
			location.href="mainAction!openProduct";
		},
		error:function(xhr,d1,d2){
		alert("aaaaaa");
			}
	});
}
</script>
</head>

<%
	User loginUser = (User)session.getAttribute("loginUser");
	String nickName = "";
	boolean hasUser = false;
	if(loginUser == null){
	}else{
		nickName = loginUser.getNickName();
		hasUser = true;
	}
	%>
<body>
<!--顶部开始-->
<div class="header_top">
   <div class="header_top_left" style="width:300px;">您好!<span style="color:blue;"><%=nickName%></span>,欢迎光临当当网|<a href="user/userAction!toLogin" target="_parent"><%=hasUser?"":" 登录 " %></a> |  <a href="user/userAction!exit" target="_parent"><%=hasUser?"安全退出 ":"" %></a> | <a href="user/userAction" target="_parent">免费注册 </a></div>
   <div class="header_top_right">
   <ul>
      <li><a>帮助</a></li>
      <li>|</li>
      <li onmouseover="myddang_show('dd_menu_top_down')" onmouseout="myddang_hidden('dd_menu_top_down')"><a href="#" target="_self">我的当当</a> <img src="images/dd_arrow_down.gif" alt="arrow" />
      <div id="dd_menu_top_down">
        <a>我的订单</a><br />
           <a>账户余额</a><br />
          <a>购物礼券</a><br />
           <a>我的会员积分</a><br />
       </div>
       </li>
      <li>|</li>
      <li><a>团购</a></li>
      <li>|</li>
      <li><a>礼品卡</a></li>
      <li>|</li> 
      <li><a>个性化推荐</a></li>
      <li>|</li>
      <li><a href="cart/cartAction!toCart" target="_parent">购物车</a></li>
      <li><img src="images/dd_header_shop.gif" alt="shopping"/></li>
   </ul>
   </div>
</div>
<!--导航开始-->
<div class="header_middle">
<div class="logo"><img src="images/dangdang_logo.jpg" alt="logo"/></div>
<div class="menu_left">
  <dl>
   <dd class="menu_left_first"></dd>
   </dl>
   <ul id="menu_left_bold">
   <li><a href="#" target="_parent" class="bold">首页</a></li>
   <li>|</li>
   <li><a href="mainAction!openProduct" target="_parent" class="bold">图书</a></li>
   <li>|</li>
   <li><a>音乐</a></li>
   <li>|</li>
   <li><a>影视</a></li>
   <li>|</li>
   <li><a>运动</a></li>
   <li>|</li>
   <li><a>服饰</a></li>
   <li>|</li>
   <li><a>家居</a></li>
   <li>|</li>
   <li><a>美妆</a></li>
   <li>|</li>
   <li><a>母婴</a></li>
   <li>|</li>
   <li><a>食品</a></li>
   <li>|</li>
   <li><a>数码家电</a></li>
   </ul>
   <dl>
   <dd class="menu_left_end"></dd>
 </dl>
</div>
<div class="menu_right" id="menu_dull_red">
 <ul>
   <li class="menu_right_1"><a>商店街</a></li>
   <li class="menu_right_2"><a>促销</a></li>
   <li class="menu_right_3"><a>当当<img src="images/dd_header_top.png" alt="榜" /></a>
   </li>
   <li class="menu_right_2"><a>社区</a></li>
   <li class="menu_right_3"><a>在线读书</a></li>
 </ul>
</div>
<div class="menu">
<div class="menu_first"></div>
<div id="menu_white">
     <a href="mainAction!openProduct" target="_self" class="menu_mid_white">小说</a>|
     <a  target="_self" class="menu_mid_white">青春</a>|
     <a target="_self" class="menu_mid_white">人文社科</a>|
     <a target="_self" class="menu_mid_white">管理</a>|
     <a target="_self" class="menu_mid_white">少儿</a>|
     <a  target="_self" class="menu_mid_white">外语</a>|
     <a target="_self" class="menu_mid_white">计算机</a>|
     <a target="_self" class="menu_mid_white">图书畅销榜</a>|
     <a target="_self" class="menu_mid_white">新书热卖榜</a>|
     <a  target="_self" class="menu_mid_white">特价书</a>|
     <a  target="_self" class="menu_mid_white">图书促销</a>|
     <a  target="_self" class="menu_mid_white">所有图书分类</a>
     </div>
<div class="menu_end"></div>
</div>
</div>
<!--搜索开始-->
<div class="header_search">
 <div class="header_serach_left"></div>
 <div class="header_serach_mid">
 <ul id="header_serach_mid_menu">
   <li><input id="header_serach" type="text"/></li>
   <li><input  onclick="searchBook()" type="image" class="header_secrch_btn" src="images/dd_header_search_btn.jpg" /></li>
   <li><img src="images/dd_arrow_right.gif" alt="arrow"/><a  target="_self">高级搜索</a></li>
   <li>|</li>
   <li><img src="images/dd_header_search_top.jpg" alt="搜索风云榜"/></li>
   <li><a target="_self">雅思</a></li>
   <li>|</li>
   <li><a target="_self">建造师</a></li>
   <li>|</li>
   <li><a target="_self">中里巴人</a></li>
   <li>|</li>
   <li><a target="_self">注会</a></li>
   <li>|</li>
   <li><a  target="_self">新概念英语</a></li>
   <li>|</li>
   <li><a target="_self">更多>></a></li>
  </ul>
 
   
 </div>
 <div class="header_serach_right"></div>
 <br/>
</div>
<!-- 通栏广告图片 -->
<br/>
<a href="#"><img src="images/dd_index_top_adver.jpg" alt="通栏广告图片" /></a>
</body>
</html>
